/*******************************************************************************************
Copyright (C) 2016 Mestrelab Research S.L. All rights reserved.

This file is part of the MNova scripting toolkit.

Authorized users of MNova Software may use this file freely, but this file is provided AS IS
with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE.
*******************************************************************************************/

/*globals NMRPredictorParams, NMRSpectrum*/

function createSpectrumTest() {
	'use strict';
}

createSpectrumTest.spectrum1D = function () {
	'use strict';
	var predParams = new NMRPredictorParams("1H"),
		peaks = [{frequency: 1.0}];
	return new NMRSpectrum(predParams, peaks, true);
};

createSpectrumTest.spectrum2D = function () {
	'use strict';
	var predParamsF2 = new NMRPredictorParams("1H"),
		predParamsF1 = new NMRPredictorParams("13C"),
		peaksF2 = [{frequency: 1.0}],
		peaksF1 = [{frequency: 20.0}];
	predParamsF2.size = 1024;
	predParamsF1.size = 256;
	return new NMRSpectrum(predParamsF2, peaksF2, predParamsF1, peaksF1, true);
};

createSpectrumTest.multipletXML = function () {
	'use strict';
	var multXML = '<mnova-multiplets version="1.0"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Mnova-Multiplet.xsd"><!--ppm. Default H:-2, C:-20--><from>2</from><!--ppm. Default H:12, C:230--><to>10</to><!--MHz. Default H:500.13, C:125--><frequency>400</frequency><!--Default Chloroform-d--><solvent>Chloroform-d</solvent><!--Default based on the range of the shifts--><nucleus>H1</nucleus><!--Default 32*1024 --><!-- <nPoints>32768</nPoints> --><multipletList><multiplet><!--8.07 (dt, J = 8.0, 0.7, 0.7 Hz, 1H)--><!--Default 1 --><numberOfNuclides>1</numberOfNuclides><shift>8.07</shift><jList><j>8.0</j><j>0.7</j><j>0.7</j></jList></multiplet><multiplet><!--5.88 (dq, J = 6.6, 3.3, 3.3, 2.1 Hz, 1H)--><numberOfNuclides>1</numberOfNuclides><shift>5.88</shift><jList><j>6.6</j><j>3.3</j><j>3.3</j><j>2.1</j></jList></multiplet><multiplet><!--3.92 (dd, J = 4.0, 2.2 Hz, 1H)--><numberOfNuclides>1</numberOfNuclides><shift>3.92</shift><jList><j>4.0</j><j>2.2</j></jList></multiplet></multipletList></mnova-multiplets>';
	return new NMRSpectrum(multXML);
};

createSpectrumTest.peakXML = function () {
	'use strict';
	var peakXML = '<mnova-peaks version="1.0"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Mnova-Peak.xsd"><spectrum><dim><from>2</from><to>10</to><frequency>400</frequency><nucleus>H1</nucleus><nPoints>32768</nPoints></dim><solvent>Chloroform-d</solvent></spectrum><peakList><peak><heigth>2</heigth><dim><shift>3</shift><width>0.1</width></dim></peak><peak><heigth>3</heigth><dim><shift>4</shift><width>0.1</width></dim></peak></peakList></mnova-peaks>';
	return new NMRSpectrum(peakXML);
};
